package com.lcw.lostandfound.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Comment {
    private Integer commentId;
    private String username;
    private Integer parentId;
    private String parentname;
    private String content;
    private Date createTime;
    private Integer goodsId;
    private Integer userId;

    private Goods goods;
    //子评论
    private List<Comment> replyComments = new ArrayList<>();

    private Comment parentComment;

    public Comment(String username, Integer parentId, String parentname, String content, Integer goodsId, Integer userId) {
        this.username = username;
        this.parentId = parentId;
        this.parentname = parentname;
        this.content = content;
        this.goodsId = goodsId;
        this.userId = userId;
    }
}
